/*
 * net_rolling_code..h
 *
 *  Created on: 2023年7月22日
 *      Author: zlw
 */

#ifndef NET_ROLLING_CODE_H_
#define NET_OLLING_CODE_H_

#include "stdint.h"

typedef enum {
  START_UP_INIT,
  PROVINED_INIT
}rollingCodeInit_t;

typedef enum {
  ROLLING_CODE_EQUAL,
  ROLLING_CODE_MORE,
  RPLLING_CODE_LESS
}rollingCode_t;

#define SAVE_ROLLING_CODE_COUNT   (100)

void save_device_recv_rolling_code(uint8_t deviceId, uint32_t rollingCode);
void itself_rolling_code_init(rollingCodeInit_t initStatus, uint32_t rollingCode);
void recv_rolling_code_init(rollingCodeInit_t initStatus, uint8_t deviceId, uint32_t rollingCode);
rollingCode_t judge_revice_rolling_code(uint8_t deviceId, uint32_t rollingCode);
uint32_t get_device_itself_rolling_code(void);

#endif /* NET_ROLLING_CODE_H_ */
